@extends('admin.admin')
@section('content-header')
    <h1>
        用户管理
        <small>注册会员</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{url('/dashboard')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
        <li class="active">用户管理 - 管理员列表</li>
    </ol>
@stop

@section('content')
    <a href="{{ url("admin/info/index") }}" class="btn btn-primary margin-bottom right">新增管理员</a>
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">会员列表</h3>
            <div class="box-tools">
                <form action="" method="get">
                    <div class="input-group">
                        <input type="text" class="form-control input-sm pull-right" name="s_title"
                               style="width: 150px;" placeholder="搜索会员">
                        <div class="input-group-btn">
                            <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="box-body table-responsive">
            <table class="table table-hover table-bordered">
                <tbody>
                <!--tr-th start-->
                <tr>
                    <th>头像</th>
                    <th>用户名</th>
                    <th>邮箱</th>
                    <th>昵称</th>
                    <th>发布时间</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
                <!--tr-th end-->
                @foreach ($admins as $admin)
                    <tr>
                        <td class="text-muted" width="50"><img src="{{ $admin->avatars }}" height="50"></td>
                        <td class="text-muted">{{ $admin->username }}</td>
                        <td class="text-muted">{{ $admin->email }}</td>
                        <td class="text-muted">{{ $admin->name }}</td>
                        <td class="text-navy">{{ $admin->created_at }}</td>
                        <td class="text-navy">{{ $admin->updated_at }}</td>
                        <td>
                            <a style="font-size: 16px"
                               href="{{ url("admin/info/index",['id'=>$admin->id,"act"=>"edit"]) }}"><i
                                        class="fa fa-fw fa-pencil" title="修改"></i></a>
                            <a style="font-size: 16px" href="#">
                                <i class="fa fa-fw fa-trash-o" title="删除" data-toggle="modal" data-target="#modal-default"
                                   data-url="{{ url("/admin/info/delete") }}" data-id="{{ $admin->id }}" onclick="saveId(this)"></i></a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>

        </div>
        <div style="text-align: center;">
            {{ $admins->links() }}
        </div>
        @include('admin.message.delete')
    </div>
@stop

